문서/이미지/텍스트 → 이미지
Nano Banana Pro· 텍스트 → 이미지
텍스트 → 이미지
POST
https://api.foxwire.ai/v1/media/generationsPricing Model
1K 7,65 ₽ · 2K 7,65 ₽ · 4K 10,2 ₽ per image. Billed only on success.
Execution Flow
Asynchronous submission model. Submitting requests queues background workers.
#작업 제출
미디어 생성은 비동기입니다. 기다리지 않고 즉시 작업 id를 받습니다.
bash
curl https://api.foxwire.ai/v1/media/generations \
-H "Authorization: Bearer $CORRY_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "nano-banana-pro", "prompt": "a cute robot mascot, flat vector logo" }'
# → { "id": "cmus7q0x9000108l3f5g2abcd", "status": "queued" }#요청 매개변수
| 매개변수 | 유형 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
prompt | string | 예 | — | Text prompt describing the image to generate (max 20000 chars). |
image_input | string[] | 아니요 | — | Optional reference/source image URLs to transform (max 8, ≤30MB each; jpeg/png/webp). |
aspect_ratio | string | 아니요 | 1:1 | Aspect ratio of the output image. 옵션: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, auto |
resolution | string | 아니요 | 1K | Output resolution. Higher resolutions take longer to generate. 옵션: 1K, 2K, 4K |
output_format | string | 아니요 | png | Format of the output image. 옵션: png, jpg |
callback_url | string | 아니요 | — | Optional public http(s) URL. We POST the task result here the moment generation finishes (success or failure). |
#Poll for the result
Generation runs asynchronously — the submit call returns immediately with a task id. Poll this endpoint with that id every few seconds until status becomes succeeded (result ready) or a terminal error (failed / timeout).
GET
https://api.foxwire.ai/v1/media/generations/{id}bash
# take the id from the submit response, then poll every ~3s
curl https://api.foxwire.ai/v1/media/generations/cmus7q0x9000108l3f5g2abcd \
-H "Authorization: Bearer $CORRY_KEY"
# repeat until "status" is "succeeded" (or "failed" / "timeout")#응답 예시
제출 시
json
{
"id": "cmus7q0x9000108l3f5g2abcd",
"status": "queued",
"type": "image",
"model": "nano-banana-pro"
}성공 시(폴링 후)
json
{
"id": "cmus7q0x9000108l3f5g2abcd",
"status": "succeeded",
"type": "image",
"model": "nano-banana-pro",
"result": { "urls": ["https://cdn.sozdai.ai/image/1782537315223-b49c0c1b771f.png"] },
"cost": "0.0500",
"currency": "USD"
}응답 필드
| 필드 | 유형 | 설명 |
|---|---|---|
status | string | 작업 상태: queued / submitted / succeeded / failed / timeout. |
type | string | 미디어 유형: image / video / music. |
model | string | 요청한 모델. |
result | object | 성공 시 존재합니다. result.urls는 영구 파일 URL의 배열입니다. |
error | string | 오류 메시지. 작업이 실패했을 때 존재합니다. |
cost | string | 이 작업에 청구된 금액 — USD 문자열(예: "0.1200"). currency 필드를 참고하세요. |
currency | string | Currency of cost — always "USD". |